<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>设置领导分管部门</title>
    <link rel="stylesheet" th:href="@{/layuiadmin/layui/css/layui.css}" href="../../../layuiadmin/layui/css/layui.css"
          media="all">
    <link rel="stylesheet" th:href="@{/css/layui-form-extend.css}">
</head>
<body>
<div style="padding: 50px;">
    <form id="lay-form" class="layui-form" lay-filter="lay-form" th:action="@{/system/user/manager_charge}" method="post">
        <div class="layui-form-item">
            <label for="chargedUserIds" class="layui-form-label" th:text="${chargeUserName} + '负责部门'">负责部门：</label>
            <div th:each="dept:${departments}" class="layui-input-block">
                <input  type="checkbox" id="chargedUserIds" name="chargedUserIds" class="layui-input"
                        th:value="${dept.id}"
                        th:title="${dept.userName}"
                        th:attr="checked=${#lists.contains(hasChargeIds,dept.id)}">
            </div>
        </div>

        <div class="layui-form-item layui-hide">
            <input type="button" lay-submit lay-filter="lay-submit" id="lay-submit" value="确认">
        </div>

        <div class="layui-hide">
            <input type="hidden" name="chargeUserId" th:value="${chargeUserId}" value="0">
        </div>
    </form>
</div>

<script th:src="@{/layuiadmin/layui/layui.js}" src="../../../layuiadmin/layui/layui.js"></script>
<script th:src="@{/js/jquery.min.js}"></script>
<script th:src="@{/js/jquery.form.js}"></script>

<script>
    layui.config({
        base: '../../../layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index', 'form', 'upload'], function () {

    })
</script>
</body>
</html>